package com.topisv.tms.repository;

import java.util.List;

import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;

import com.topisv.tms.entity.ExpressConfigure;

public interface ExpressConfigureDao extends PagingAndSortingRepository<ExpressConfigure, Long>,JpaSpecificationExecutor<ExpressConfigure>{
	
	@Query("select e from ExpressConfigure e where e.companyCode=?")
	List<ExpressConfigure> findExpressConfigureByCompany(String companyCode);
	
	@Query("select e from ExpressConfigure e where e.warehouseCode=?1 and e.companyCode=?2")
	ExpressConfigure findByWarehouseAndCompany(String warehouseCode,String companyCode);
}
